import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/education/education_summary_binary_entity.dart';

EducationSummaryBinaryEntity $EducationSummaryBinaryEntityFromJson(Map<String, dynamic> json) {
  final EducationSummaryBinaryEntity educationSummaryBinaryEntity = EducationSummaryBinaryEntity();
  final int? finishCount = jsonConvert.convert<int>(json['finishCount']);
  if (finishCount != null) {
    educationSummaryBinaryEntity.finishCount = finishCount;
  }
  final int? rate = jsonConvert.convert<int>(json['rate']);
  if (rate != null) {
    educationSummaryBinaryEntity.rate = rate;
  }
  final int? unFinishCount = jsonConvert.convert<int>(json['unFinishCount']);
  if (unFinishCount != null) {
    educationSummaryBinaryEntity.unFinishCount = unFinishCount;
  }
  return educationSummaryBinaryEntity;
}

Map<String, dynamic> $EducationSummaryBinaryEntityToJson(EducationSummaryBinaryEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['finishCount'] = entity.finishCount;
  data['rate'] = entity.rate;
  data['unFinishCount'] = entity.unFinishCount;
  return data;
}

extension EducationSummaryBinaryEntityExtension on EducationSummaryBinaryEntity {
  EducationSummaryBinaryEntity copyWith({
    int? finishCount,
    int? rate,
    int? unFinishCount,
  }) {
    return EducationSummaryBinaryEntity()
      ..finishCount = finishCount ?? this.finishCount
      ..rate = rate ?? this.rate
      ..unFinishCount = unFinishCount ?? this.unFinishCount;
  }
}
